package com.decorator.standard;

public class ConcreteDecoratorA extends Decorator {
    public void operation(){
        super.operation();
        eat();
    }
    private void eat(){
        System.out.println("装饰新增方法");
    }

    public static void main(String[] args) {
        ConcreteComponent c = new ConcreteComponent();
        ConcreteDecoratorA concreteDecoratorA = new ConcreteDecoratorA();
        concreteDecoratorA.setComponent(c);
        concreteDecoratorA.operation();
    }
}
